<template>
	<view class="box">
		<view class="headImage">
			<u-image
				src="https://oneredhealth.oss-cn-hangzhou.aliyuncs.com/2023/10/12/19a344c6e70c4ab79911b8745269dd93.png"
				width="206rpx" height="206rpx" mode="aspectFit" v-if="delivery !== '2'" />
			<u-image
				src="https://oneredhealth.oss-cn-hangzhou.aliyuncs.com/2023/10/12/9776e206b67c459183bc9544ae6614a5.png"
				width="206rpx" height="206rpx" mode="aspectFit" v-if="delivery == '2'" />
		</view>
		<u-gap height="104rpx" />
		<u-text text="您已领取成功，等接收快递吧~" size="36rpx" color="#666" align="center" v-if="delivery == '0'" />
		<u-text text="您已领取成功，请现场提货吧!" size="36rpx" color="#666" align="center" v-if="delivery == '1'" />
		<u-text text="您还未签到,请先扫码签到会议!" size="36rpx" color="#666" align="center" v-if="delivery == '2'" />
		<view class="lq_btn" @click="to_successed()" v-if="delivery == '1'">我已领到礼品</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				delivery: '',
			}
		},
		onUnload() {
			// uni.navigateTo() 保留当前页，跳转到非 tabBar 页
			// uni.redirectTo() 关闭当前页，跳转到非 tabBar 页
			// uni.reLaunch() 关闭所有页面，打开到应用内的某个页面
			// uni.navigateBack() 关闭当前页，返回上一页面或多级页面
			// uni.switchTab({
			// 	url: '/pages/receive/receive'
			// });
			uni.reLaunch({
				url: '/pages_myMeeting/receive/index'
			})
		},
		onLoad(options) {
			this.delivery = options.delivery //发货类型
		},
		methods: {
			to_successed() {
				uni.reLaunch({
					url: '/pages_myMeeting/receive/index'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		background-color: #fff;
		color: #333;
		padding: 20rpx 28rpx 0;
		height: 100vh;

		.headImage {
			width: 206rpx;
			height: 206rpx;
			margin: 282rpx auto 0;
		}

		.lq_btn {
			width: 260rpx;
			height: 60rpx;
			border-radius: 37rpx;
			line-height: 60rpx;
			color: #fff;
			background-color: #54c858;
			text-align: center;
			font-size: 20rpx;
			margin: 400rpx auto 0;
		}
	}
</style>
